home *** CD-ROM | disk | FTP | other *** search
/ Enter 2006 October / Enter 10 2006.iso / boot / isolinux / initrd / in / etc / rc.d / rc.S next >
Encoding:
Text File  |  2006-07-23  |  3.2 KB  |  158 lines

  1. #!/bin/sh
  2. # Modified by: Damian Rakowski <maestromae@o2.pl>
  3. # This is a function to unload the USB mouse/keyboard modules:
  4.  
  5. TMP=/var/log/setup/tmp
  6.  
  7. echo
  8. echo "Booting Kate OS Installation CD !!!!"
  9. echo
  10. mount sys -t sysfs /sys
  11. mount proc -t proc /proc
  12. /bin/mount -t ext2 /dev/ram0 / -o remount,rw
  13. sh /etc/rc.d/rc.udev start
  14.  
  15. /bin/rm -f /etc/mtab* /etc/nologin
  16. mount -a -o nofs 1>/dev/null 2>/dev/null 
  17.  
  18. /sbin/swapon -a 2> /dev/null
  19.  
  20. echo "0" > /proc/sys/kernel/printk 
  21.  
  22. SCSI_MODULES="libata aic7xxx BusLogic \
  23. ncr53c8xx NCR53c406a \
  24. initio \
  25. advansys aha1740 aha1542 aha152x \
  26. atp870u dtc eata fdomain gdth \
  27. megaraid pas16 psi240i \
  28. qlogicfas \
  29. t128 tmscsim u14-34f ultrastor wd7000 \
  30. a100u2w 3w-xxxx sd_mod sr_mod"
  31.  
  32. OLDCD_MODULES="aztcd cdu31a cm206 gscd \
  33. isp16 mcdx optcd sbpcd sjcd sonycd535"
  34.  
  35. MD_MODULES="md-mod linear xor raid0 raid1 raid10 raid5"
  36.  
  37. SATA_MODULES="libata sata_nv sata_promise sata_qstor sata_mv sata_sil sata_sil24 sata_sis sata_svw sata_sx4 \
  38. sata_uli sata_via ata_piix sd_mod sr_mod"
  39.  
  40. FOUND_SCSI=""
  41.  
  42. SCSI="no"
  43. OLDCD="no"
  44. SATA="no"
  45.  
  46. CMDLINE="`cat /proc/cmdline`"
  47. for x in $CMDLINE
  48. do
  49.     if test "$x" = "scsi" ; then
  50.     SCSI="yes"
  51.     elif  test "$x" = "oldcd" ; then 
  52.         OLDCD="yes"
  53.         elif  test "$x" = "sata" ; then 
  54.         SATA="yes"
  55.     elif  test "$x" = "md" ; then 
  56.         MD="yes"
  57.     fi
  58. done
  59.  
  60.  
  61. loadmodules(){
  62. TYPE=$TYPEX
  63. for i in "$@"; do
  64. echo  "Probing ${TYPE}... $i"
  65. if modprobe $i >/dev/null 2>&1
  66. then
  67. echo "Found ${TYPE} device(s) handled by $i."
  68. case "$TYPE" in scsi|SCSI) FOUND_SCSI="yes"; ;; esac
  69. fi
  70. done
  71. }
  72.  
  73.  
  74. if test "$SCSI" = "yes" ; then
  75. TYPEX="SCSI"
  76. loadmodules $SCSI_MODULES
  77. fi
  78.  
  79. if test "$OLDCD" = "yes" ; then
  80. TYPEX="OLDCD"
  81. loadmodules $OLDCD_MODULES
  82. fi
  83.  
  84. if test "$MD" = "yes" ; then
  85. TYPEX="MD"
  86. loadmodules $MD_MODULES
  87. fi
  88.  
  89. if test "$SATA" = "yes" ; then
  90. TYPEX="SATA"
  91. loadmodules $SATA_MODULES
  92. fi
  93.  
  94. if [ -d /proc/ide ]; then
  95. modprobe ide-disk &>/dev/null
  96. modprobe ide-cd &>/dev/null
  97. fi
  98.  
  99. modprobe nls_iso8859-2 &>/dev/null
  100. modprobe nls_cp437 &>/dev/null
  101. modprobe msdos &>/dev/null
  102. modprobe vfat &>/dev/null
  103. modprobe jbd &>/dev/null
  104. modprobe ext3 &>/dev/null
  105. modprobe ntfs &>/dev/null
  106. modprobe reiserfs &>/dev/null
  107. modprobe cdrom &>/dev/null
  108. modprobe loop &>/dev/null
  109.  
  110. /bin/setterm -blank 0
  111.  
  112.  
  113. echo
  114. echo "<OPTION TO LOAD SUPPORT FOR NON-US KEYBOARD>"
  115. echo
  116. echo "If you are not using a US keyboard, you may now load a different"
  117. echo "keyboard map.  To select a different keyboard map, please enter 1"
  118. echo "now.  To continue using the US map, just hit enter."
  119. echo
  120. echo -n "Enter 1 to select a keyboard map: "
  121. read ONE
  122. if [ "$ONE" = "1" ]; then
  123.   /usr/lib/setup/SeTkeymap
  124. fi
  125.  
  126. dialog --no-cancel --default-item "US" \
  127.    --menu "Select your language:" 0 0 0 \
  128.    "Polish" "pl_PL" \
  129.    "US" "en_US" \
  130.    2> $TMP/reply
  131.    OPTION=`cat $TMP/reply`
  132. if test "$OPTION" = "Polish" ; then
  133. export LANG="pl_PL"
  134. echo "export LANG=\"pl_PL\"" >> /etc/profile
  135. else
  136. export LANG="C"
  137. echo "export LANG=\"C\"" >> /etc/profile
  138. fi
  139. export LC_COLLATE=C
  140. echo "export LC_COLLATE=\"C\"" >> /etc/profile
  141.  
  142. clear
  143.  
  144. # Make detected partitions:
  145. /dev/makedevs.sh
  146.  
  147. if [ "$LANG" = "pl_PL" ]; then
  148. setfont /usr/share/kbd/consolefonts/lat2a-16.psfu.gz
  149. cat /etc/issue.pl
  150. else
  151. cat /etc/issue
  152. fi
  153.  
  154. # Fake login:  (fooled ya! ;^)
  155. echo -n "Kate OS login: "
  156. read BOGUS_LOGIN
  157. cat /etc/motd
  158.